<template>
  <j-modal
    :title="title"
    :width="width"
    :visible="visible"
    switchFullscreen
    :footer="null"
     @cancel="handleCancel"
    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }">
    <camera-data-list ref="realForm"></camera-data-list>
  </j-modal>
</template>

<script>
  import CameraDataList from './CameraDataList.vue'
  export default{
    name:'WeatherModal',
    components: {
      CameraDataList
    },
    data () {
      return {
        title:'',
        deviceName:'',
        width:1000,
        visible: false,
        disableSubmit: false,
      }
    },
    methods:{
      open(e){
        this.visible = true
        this.$nextTick(()=>{
          this.$set(this.$refs.realForm.queryParam,'deviceId',e.deviceId)
          this.title = '设备名称：'+e.name
          this.$refs.realForm.loadData()
       })
      },
      close () {
        this.$emit('close');
        this.visible = false;
      },
      handleCancel () {
        this.close()
      },
      handleOk () {
        this.$refs.realForm.submitForm();
      },
      submitCallback(){
        this.$emit('ok');
        this.visible = false;
      },
    }
  }
</script>

<style>
</style>